<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<!DOCTYPE html>
<html>    
    <head>        
        <title>Forgot Password?</title>
        <meta name="viewport" content="width=device-width, initial-scale=1"> 
        <meta name="description" content="Edit Listing" />

        <link rel="stylesheet" href="${model.props.appPath}/css/jquery_mobile/jquery.mobile-1.2.1.min.css" type="text/css"/>        
        <style>
            a {color:#404042;text-decoration:none;}      /* unvisited link */
            @font-face
            {
                font-family: avant;
                src: url('${model.props.appPath}/fonts/avangmi-webfont.ttf');
            }
            body  * {
                font-family: avant !important;
            }
        </style>

        <script type="text/javascript" src="${model.props.appPath}/js/jquery/jquery-1.8.3.min.js"></script>
        <script type="text/javascript" src="${model.props.appPath}/js/jquery_mobile/jquery.mobile-1.2.1.min.js"></script>

        <%@ include file="include/listingedit_mobile_incl.jsp" %> 

        <link rel="stylesheet" href="css/bootstrap/prettify.css" rel="stylesheet">
        <link rel="stylesheet" href="css/bootstrap/index.css" rel="stylesheet">

        <script src="js/bootstrap/bootstrap.min.js"></script>
        <script src="js/bootstrap/bootstrap-wysiwyg.js"></script>
        <script src="js/bootstrap/jquery.hotkeys.js"></script>
        
        <script type="text/javascript" src="${model.props.appPath}/js/jquery/jquery-1.8.3.min.js"></script>
        <script type="text/javascript" src="${model.props.appPath}/js/block/jquery.blockUI.js"></script>  
        <script type="text/javascript">
            function submitForm() {
                $.blockUI({ message: "<div style='font-family: Century Gothic, Calibri, Verdana; padding: 10px;'>Retrieving Password ...</div>" });
                $("form#formID").submit();
            }
        </script>
        
        <script>
            function switchMenu() {
                if ($('#menu').is(':visible')) {
                    $("#menu").hide();
                }
                else {
                    $("#menu").show();
                }
            }
        </script>

        <script>
            (function(i, s, o, g, r, a, m) {
                i['GoogleAnalyticsObject'] = r;
                i[r] = i[r] || function() {
                    (i[r].q = i[r].q || []).push(arguments)
                }, i[r].l = 1 * new Date();
                a = s.createElement(o),
                        m = s.getElementsByTagName(o)[0];
                a.async = 1;
                a.src = g;
                m.parentNode.insertBefore(a, m)
            })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
            ga('create', 'UA-44197833-1', 'rentpad.com.ph');
            ga('send', 'pageview');
        </script>

    </head>

    <body>
        <div data-role="page" data-theme="d">

            <%@include file="header_mobile.jsp" %>

            <div data-role="header" data-theme="c">
                <p style="color: #666666; font-size: 16px; text-align: center;">Retrieve Password</p>   
            </div>

            <div data-role="content" style="background-color: #ffffff">
                  
                    <c:choose>
                        <c:when test="${model.submit == 0}">                            
                            <form id="formID" action="password.htm">
                                <table cellpadding="5" cellspacing="5" style="margin-left:0px; background-color: #f7f7f7; width:100%;">
                                    <tr>
                                        <td style="font-size: 18px; font-weight: normal; vertical-align: middle; padding-top:10px;">&nbsp;&nbsp;&nbsp;&nbsp;Enter email that you used:</td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <input name="email" type="text" style="width:100%;" value=""/>
                                            <input type="hidden" name="s" value="1" />
                                            <a href="#" data-role="button" style="" onclick="submitForm();" data-theme="a">Submit</a>

                                        </td>
                                    </tr>
                                </table>
                            </form>                        
                        </c:when>
                        <c:otherwise>
                            <c:choose>
                                <c:when test="${model.success == 1}">
                                    <p>&nbsp;&nbsp;&nbsp;&nbsp;<b style="color: green;">Success!</b> Your login details are sent to your email. Make sure you also check your SPAM folder. =)</b></p>
                                </c:when>
                                <c:otherwise>
                                    <p>&nbsp;&nbsp;&nbsp;&nbsp;<b style="color: red;">Failed.</b> We could not recognize this email. Maybe you would like to <a href="password.htm" style="color:#369; text-decoration: underline;">try again</a> or <a href="signup.htm" style="color:#369; text-decoration: underline;">sign up</a> with this email?</b></p>                                    
                                </c:otherwise>
                            </c:choose>                            
                        </c:otherwise>
                    </c:choose>          
                             
            </div>

            <br>            

            

            <br>
                      
            <div data-role="footer">
                <%@include file="footer_mobile.jsp" %>      
            </div>

        </div>
    </body>
</html>
